<?php

namespace App\Http\Requests;

use App\Exceptions\CustomValidateException;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Foundation\Http\FormRequest;

class AccLogin extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'acc_lg_name' => ['required', 'string'],
            'acc_lg_pwd' => ['required', 'string'],
        ];
    }

    protected function failedValidation(Validator $validator) {
        throw new CustomValidateException($validator);
    }
}
